package com.my.study.bean;

import java.util.HashMap;
import java.util.Map;

/**
 * 参考博客：https://blog.csdn.net/u010398771/article/details/82968574
 *
 * @author: yidujun
 * @create: 2021/03/23 16:53
 */
public class Test {

    public static void main(String[] args) throws Exception {
        Map<String, String> parameters = new HashMap<String, String>(){
            {
                //这里的key要和Node里面的属性名一致
                put("nodeName", "昭君");
                put("user", "zhaoJun|changhe@163.com|2018-10-08 15:06:00");
            }
        };

        Node node = PropertyEditorSample.convert(parameters);
        System.out.println(node.getNodeName());
        System.out.println(node.getUser());

        UserDto userDto = new UserDto();

        User user = new User();
        user.setId(userDto.getId());
        user.setName(userDto.getName());
        user.setEmail(userDto.getEmail());
        user.setDate(userDto.getDate());


    }

}
